﻿
<?php
    function getfield($fieldname)
    {
        $value = "\"".$_GET[$fieldname]."\"\r\n";
        $value = iconv('utf-8', 'windows-1251', $value);
        return $value;
    }
?>

<script language="VbScript">

    function PrintTicket()
        Dim infomat
        set infomat = CreateObject("Infomat.TicketPrinter")
        infomat.field_date = <?php echo getfield("date");?>
        infomat.field_time = <?php echo getfield("time");?>
        infomat.field_postspeciality = <?php echo getfield("postspeciality");?>
        infomat.field_postfio = <?php echo getfield("postfio");?>
        infomat.field_postdivision = <?php echo getfield("postdivision");?>
        infomat.field_place = <?php echo getfield("place");?>
        infomat.field_patientfio = <?php echo getfield("patientfio");?>
        infomat.field_cardnumber = <?php echo getfield("cardnumber");?>
        infomat.field_state = <?php echo getfield("state");?>
        call infomat.PrintTicket("Star*")
        //http://infomat.ru/?code=2223366999888000
        set infomat = nothing
    end function

    PrintTicket

</script>